package com.ruoyi.process.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.process.mapper.WorkMergeplateMapper;
import com.ruoyi.process.domain.WorkMergeplate;
import com.ruoyi.process.service.IWorkMergeplateService;

/**
 * 合盘管理Service业务层处理
 *
 * @author ruoyi
 * @date 2021-07-12
 */
@Service
public class WorkMergeplateServiceImpl implements IWorkMergeplateService
{
    @Autowired
    private WorkMergeplateMapper workMergeplateMapper;


    @Override
    public List<WorkMergeplate> selectWorkMergeplateByuserId(Long userId)
    {
        return workMergeplateMapper.selectWorkMergeplateByuserId(userId);
    }
    /**
     * 查询合盘管理
     *
     * @param workMergeplateId 合盘管理ID
     * @return 合盘管理
     */
    @Override
    public WorkMergeplate selectWorkMergeplateById(Long workMergeplateId)
    {
        return workMergeplateMapper.selectWorkMergeplateById(workMergeplateId);
    }

    /**
     * 查询合盘管理列表
     *
     * @param workMergeplate 合盘管理
     * @return 合盘管理
     */
    @Override
    public List<WorkMergeplate> selectWorkMergeplateList(WorkMergeplate workMergeplate)
    {
        return workMergeplateMapper.selectWorkMergeplateList(workMergeplate);
    }

    /**
     * 新增合盘管理
     *
     * @param workMergeplate 合盘管理
     * @return 结果
     */
    @Override
    public int insertWorkMergeplate(WorkMergeplate workMergeplate)
    {
        workMergeplate.setCreateTime(DateUtils.getNowDate());
        return workMergeplateMapper.insertWorkMergeplate(workMergeplate);
    }

    /**
     * 修改合盘管理
     *
     * @param workMergeplate 合盘管理
     * @return 结果
     */
    @Override
    public int updateWorkMergeplate(WorkMergeplate workMergeplate)
    {
        workMergeplate.setUpdateTime(DateUtils.getNowDate());
        return workMergeplateMapper.updateWorkMergeplate(workMergeplate);
    }

    /**
     * 批量删除合盘管理
     *
     * @param workMergeplateIds 需要删除的合盘管理ID
     * @return 结果
     */
    @Override
    public int deleteWorkMergeplateByIds(Long[] workMergeplateIds)
    {
        return workMergeplateMapper.deleteWorkMergeplateByIds(workMergeplateIds);
    }

    /**
     * 删除合盘管理信息
     *
     * @param workMergeplateId 合盘管理ID
     * @return 结果
     */
    @Override
    public int deleteWorkMergeplateById(Long workMergeplateId)
    {
        return workMergeplateMapper.deleteWorkMergeplateById(workMergeplateId);
    }
}
